package services;

import dao.IUser;
import factory.UserDaoFactory;
import vo.Users;

public class UserServicempl implements IUserService{
    @Override
    public boolean isValid(String username, String password) {
        IUser iUser= UserDaoFactory.getInstance();//获取对其实现操作的具体类
       Users users=iUser.getUser(username,password);//连接数据库,并且查询账户信息是否存在
        return users!=null?true:false; //不为空则代表查到了用户合法,反之非法
    }
}
